﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.DynamicProxy
{
    internal interface ITestService
    {
        public int Add(int a, int b);
    }

    [InterceptAttribut(typeof(AOPTest))]
    internal class TestService : ITestService
    {
        public int Add(int a, int b)
        {
            Console.WriteLine($"正在执行--》Add({a},{b})");
            throw new Exception("方法执行--》测试异常");
            return a + b;
        }
    }
}
